package com.edu.test;
/*
 * @Author:princess
 * @Date 2023/10/19 10 19 8:47
 *
 */

import com.edu.bean.User;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest2 {

    ApplicationContext context;

    @Before
    public void init(){
        context = new ClassPathXmlApplicationContext("spring-ioc2.xml");
    }

    @Test
    public void test01(){
        User user = context.getBean("user", User.class);
        System.out.println(user);
        System.out.println(user.getRelationships());
    }

}
